<link href="/public/css/them1/Base.css" type="text/css" rel="stylesheet" />
<link href="/public/css/them1/News.css" type="text/css" rel="stylesheet" />
<link href="/public/css/them1/Menu-2.css" type="text/css" rel="stylesheet" />
<link href="/public/css/them1/Banner.css" rel="stylesheet" type="text/css"/>

<center>
    <div class="div_content_all">
        <?php include dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR.'home'.DIRECTORY_SEPARATOR.'top_menu2.php'; ?>
        <div class="clear">
        </div>

        <div id="breadcrumb">
        </div>

        <div id="content">

            <div class="bortop">
            </div>
            <div class="borleft">
                <div class="borright">
                    <div class="bgwhite">
                        <div style="height: 4px;">
                        </div>
                        <div id="left-col">

                            <div id="topnews">
                                <div class="first">
                                    <a href="/chitiet/<?php echo $aryFirtNews['news_id'];?>/<?php echo $aryFirtNews['news_title_filter'];?>.html">
                                        <img src="<?php echo $aryFirtNews['news_large_image'];?>"/>
                                    </a>
                                    <h1>
                                        <a href="/chitiet/<?php echo $aryFirtNews['news_id'];?>/<?php echo $aryFirtNews['news_title_filter'];?>.html">
                                            <?php echo $aryFirtNews['news_title'];?>
                                        </a>
                                    </h1>
                                    <p class="description">
                                        <?php echo $aryFirtNews['news_content_filter'];?>
                                    </p>
                                </div>
                                <div class="another">
                                    <ul>
                                        <?php foreach ($aryTopNews as $key => $value) {?>
                                        <li>
                                        <h2>
                                            <p>
                                            <a href="/chitiet/<?php echo $value['news_id'];?>/<?php echo $value['news_title_filter'];?>.html"><img src="<?php echo $value['news_main_image'];?>" class="fl"></a>
                                            <a href="/chitiet/<?php echo $value['news_id'];?>/<?php echo $value['news_title_filter'];?>.html"><?php echo $value['news_title'];?></a>
                                            </p>
                                        </h2>
                                    <p class="description">
                                        <?php echo $value['news_content_filter'];?><span class="picturenews">&nbsp;&nbsp;&nbsp;</span>
                                    </p>
                                    <p class="clear"></p>
                                    </li>
                                    <?php } ?>
                                </ul>
                            </div>
                                <div class="clear"></div>
                            </div>

                            <div id="category-list">
                                <?php foreach ($aryNewsCategory as $key => $value) {?>
                                <div class="category-detail">
                                    <div class="HeaderBox">
                                        <ul class="category-nav">
                                            <li class="category-main">
                                                <a href="/tin/<?php echo $value['news_category_id'];?>/<?php echo $value['news_category_filter'];?>.html">
                                                    <?php echo $value['news_category_name'];?>
                                                </a>
                                            </li>|
                                                <?php foreach ($aryNewsSubCategory as $key => $subCat) {?>
                                                    <?php if($value['news_category_id'] == $subCat['news_category_parent']) {?>
                                                        <li class="category-item">
                                                        <a href="/tin/<?php echo $subCat['news_category_id'];?>/<?php echo $subCat['news_category_filter'];?>.html">
                                                            <?php echo $subCat['news_category_name'];?>
                                                        </a>
                                                    </li>|
                                                    <?php } ?>
                                                <?php } ?>
                                            
                                        </ul>
                                    </div>
                                    <div class="first">
                                    <?php if(is_array($aryNewsData[$value['news_category_id']])){?>
                                        <?php foreach ($aryNewsData[$value['news_category_id']] as $keyNews => $newsValue) {?>
                                           <?php if($newsValue['news_title']) {?>
                                        <?php if($keyNews == 0){?>
                                                <ul>
                                            <li>
                                                <p>
                                                    <a href="/chitiet/<?php echo $newsValue['news_id'];?>/<?php echo $newsValue['news_title_filter'];?>.html">
                                                        <img class="fl" src="<?php echo $newsValue['news_main_image'];?>"/>
                                                    </a>
                                                    <a href="/chitiet/<?php echo $newsValue['news_id'];?>/<?php echo $newsValue['news_title_filter'];?>.html">
                                                        <?php echo $newsValue['news_title'];?>
                                                    </a>
                                                </p>
                                                <p class="description">
                                                    <?php echo $newsValue['news_content_filter'];?>
                                                </p>
                                                <p class="clear">
                                                </p>
                                            </li>

                                        </ul>
                                            
                                        <?php } else {?>
                                            <div class="another">

                                            <div class="bullet_news">
                                                <a href="/chitiet/<?php echo $newsValue['news_id'];?>/<?php echo $newsValue['news_title_filter'];?>.html">
                                                    <?php echo $newsValue['news_title'];?>
                                                </a>
                                            </div>
                                        </div>
                                        <?php } ?>
                                        <?php }?>
                                        <?php } ?>
                                    <?php }?>
                                    </div>
                                    <div class="right">
                                        <table cellspacing="0" cellpadding="0" border="0">
                                            <tr>
                                                <?php if(is_array($aryProduct[$value['news_category_id']])){?>
                                                    <?php foreach ($aryProduct[$value['news_category_id']] as $keyPro => $product) {?>
                                                    <td valign="top">
                                                    <div class="item">
                                                        <div class="image">
                                                            <div class="divvalign">
                                                                <div class="divvalign2">
                                                                    <a href="/product/<?php echo $product['product_id'];?>/<?php echo $product['product_title_filter'];?>.html">
                                                                        <img width="85" height="85" src="<?php echo $product['product_main_image'];?>"/>
                                                                    </a>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="name">
                                                            <a href="/product/<?php echo $product['product_id'];?>/<?php echo $product['product_title_filter'];?>.html"><?php echo $product['product_title'];?></a>
                                                        </div>
                                                    </div>
                                                </td>
                                                    <?php if($keyPro == 2){ break;} } ?>
                                                <?php } ?>
                                            </tr>
                                        </table>
                                        <div class="productlist">
                                            <table cellspacing="0" cellpadding="0" border="0" width="100%">
                                                <col width="50%">
                                                <col width="50%">
                                                <tr>
                                                <?php if(is_array($aryProduct[$value['news_category_id']])){?>
                                                    <?php $i = 1;foreach ($aryProduct[$value['news_category_id']] as $keyPro => $product) {?>
                                                    <?php if($keyPro > 3){?>
                                                    <td valign="top">
                                                        <div class="bullet_news">
                                                            <a href="/product/<?php echo $product['product_id'];?>/<?php echo $product['product_title_filter'];?>.html"><?php echo $product['product_title'];?></a>
                                                        </div>
                                                    </td>
                                                    <?php echo ($i % 2 == 0) ? '</tr><tr>' : '';?>
                                                    <?php $i++;} ?>
                                                    <?php } ?>
                                                <?php } ?>
                                                </tr>
                                            </table>
                                        </div>
                                    </div>
                                    <div class="clear">
                                    </div>
                                    
                                </div>
                                
                                <?php } ?>
                            </div>

                        </div>
                        <div id="right-col">
                            <div id="mostread" class="Box1">
                                <div class="Header">
                                    Những bài viết được quan tâm
                                </div>
                                <div class="Content">
                                    <ul>
                                        <?php foreach ($aryTopTenNews as $key => $value) {?>
                                        <li>
                                            <a><?php echo $value['news_title'];?></a>
                                        </li>
                                        <?php } ?>
                                    </ul>
                                </div>

                            </div>
                            <div class="div_height"></div>
                            <div id="mostread" class="Box1">
                                <div class="Header">
                                    Danh mục sản phẩm
                                </div>
                                <div class="Content">
                                    <div class="height"></div>
                                    
                                    <div class="div_item_category_list">
                                        <?php include 'news_product_category.php';?>
                                    </div>

                                </div>
                            </div>

                            <div class="height"></div>

                        </div>
                        <div class="clear">
                        </div>
                    </div>
                </div>
            </div>

            <div class="borbottom">
            </div>
        </div>
    </div>
    <div class="clear">
    </div>
    <?php include dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR.'home'.DIRECTORY_SEPARATOR.'home_footer.php'; ?>

</center>